
/*
 *  Copyright 2007 Marc Lanctot and Marc Gendron-Bellemare
 *
 *  This file is part of OpenMTG.
 *
 *  OpenMTG is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  OpenMTG is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with OpenMTG.  If not, see <http://www.gnu.org/licenses/>.
 *
 */


public class Engine {
  private GameState state;
  private Dealer d;

  public Engine(String deckFiles[]){
    state=new GameState();
    d=new Dealer(deckFiles);
  }

  public void run(){

    /**
       1. BEGINNING PHASE
         a. Untap step
           You untap all your tapped permanents. On the first turn of the game, skip this
           step. No one can play spells or abilities during this step.
         b. Upkeep step
           Abilities that trigger "at beginning of upkeep step" go on the stack.
           Players can play instants and activated abilities.
         c. Draw step
           You draw a card from your library.  Players can play instants and activated
           abilities.

       2. FIRST MAIN PHASE
           You can play any number of sorceries, instants, creatures, artifacts,
           enchantments, and activated abilities. You can play a land during this phase.
           Your opponent can play instants and activated abilities.

       3. COMBAT PHASE
         a. Beginning of combat step
           Players can play instants and activated abilities.
         b. Declare attackers step
           You decide which, if any, of your untapped creatures will attack, then they do
           so. This taps the attacking creatures. Players can play instants and activated
           abilities.
         c. Declare blockers step
           Your opponent decides which, if any, of his or her untapped creatures will
           block your attacking creatures, then they do so.
           Players can play instants and activated abilities.
         d.Combat damage step
           Each creature assigns its combat damage to the defending player (if it's
           attacking and unblocked.)  Once players decide how the creatures they control
           will deal their damage, it's "locked in" and goes onto the stack. It will be
           dealt even if some of the creatures leave play. (TODO: ??)
           Players may play instants and activated abilities.

       4. SECOND MAIN PHASE
         As first main phase.

       5. END PHASE
         a. End of turn step
           Abilities that trigger "at end of turn" go on the stack.  Players can play
           instants and activated abilities.
         b. Cleanup step
           If you have more than 7 cards in your hand, you must discard down to 7. All
           damage is removed from creatures; all "until end of turn" effects end. No
           one may play spells or abilities unless an ability triggers during this step.
     */

  }

}
